import React from 'react'
import { View, Image } from '@tarojs/components'
import { COMMENT_LEVELS } from '@CONSTANTS/order'
import Images from '@ASSET/Images'
import './CommentScore.scss'

export default function CommentScore({ score }) {
  return (
    <View className="comment-score-container">
      {COMMENT_LEVELS.map((item, index) => (
        <Image
          key={item.Name}
          src={Images.comment.small_star}
          className={`comment-star ${index < score ? 'active' : ''}`}
        />
      ))}
    </View>
  )
}
